package org.goldfish.message_board01.services;

import org.goldfish.message_board01.dao.AbstractDAO;

import java.util.LinkedList;

public class AbstractService {
    LinkedList<AbstractDAO> daos;
    public AbstractService() {
        daos = new LinkedList<>();
    }
    public void destroy() {
        for (AbstractDAO dao : daos) {
            dao.destroy();
        }
    }
    public void addDAO(AbstractDAO dao) {
        daos.add(dao);
    }
}
